package com.spbl.web;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Description(权限验证测试)
 * author: Gao xueyong
 * Create at: 2020/6/9 10:01 下午
 */
@Slf4j
@RequestMapping("/user")
@RestController
public class UserController {

    @GetMapping("/admin/list")
    public String adminList(HttpServletRequest request) {
        String msg = request.getContextPath() + "权限验证通过！";
        log.info(msg);
        return msg;
    }


    @GetMapping("/student/list")
    public String studentList(HttpServletRequest request) {
        String msg = request.getContextPath() + "权限验证通过！";
        log.info(msg);
        return msg;
    }

    @GetMapping("/create/page")
    public String createPage(HttpServletRequest request) {
        String msg = request.getContextPath() + "权限验证通过！";
        log.info(msg);
        return msg;
    }
}
